import { Tab } from '@/components/SwitchTabs/index.vue'

export const getTabs = (): Tab[] => {
  return [
    {
      name: '在线服务',
      auth: 'auth-manage',
      key: '/auth-manage/online-service/list'
    },
    {
      name: '序列号',
      auth: 'auth-manage',
      key: '/auth-manage/serial-number/list'
    },
    {
      name: 'License',
      auth: 'auth-manage',
      key: '/auth-manage/license/list'
    }
  ]
}

export const getRecordIdentity = (type: string) => {
  const identity: any = {
    '1': '用户',
    '2': '管理员'
  }
  return identity[type] || ''
}

export const statusObj: any = {
  待删除: {
    name: '待删除',
    value: 0,
    background: 'rgba(25, 25, 48, 0.45)',
    color: 'rgba(25, 25, 48, 0.45)',
    tooltip: true
  },
  运行中: {
    name: '运行中',
    value: 1,
    background: 'rgba(55, 150, 137, 0.08)',
    color: 'rgba(55, 150, 137, 1)',
    tooltip: false
  },
  待启用: {
    name: '待启用',
    value: 2,
    background: 'rgba(92, 201, 105, 0.08)',
    color: 'rgba(92, 201, 105, 1)',
    tooltip: true
  },
  待停用: {
    name: '待停用',
    value: 3,
    background: 'rgba(245, 151, 0, 0.08)',
    color: 'rgba(245, 151, 0, 1)',
    tooltip: true
  },
  已停用: {
    name: '已停用',
    value: 4,
    background: 'rgba(214, 24, 96, 0.08)',
    color: 'rgba(214, 24, 96, 1)',
    tooltip: false
  },
  已删除: {
    name: '已删除',
    value: 4,
    background: 'rgba(214, 24, 96, 0.08)',
    color: 'rgba(214, 24, 96, 1)',
    tooltip: false
  }
}
